package IC.AST;

/**
 * Abstract base class for statement AST nodes.
 * 
 * @author Tovi Almozlino
 */
public abstract class Statement extends ASTNode {

	/**
	 * Constructs a new statement node. Used by subclasses.
	 * 
	 * @param line
	 *            Line number of statement.
	 */
	protected Statement(int line,StmtType type) {
		super(line);
		this.Stmt_type = type;
	}
	
	public boolean isLocalVarStmt(){
		return (StmtType.LOCALVAR_STMT == Stmt_type);
	}
	
	protected StmtType Stmt_type;
	protected enum StmtType {
		BLOCK_STMT,
		IF_STMT,
		CONTINUE_STMT,
		RETURN_STMT,
		BREAK_STMT,
		CALL_STMT,
		ASSIGN_STMT,
		LOCALVAR_STMT,
		WHILE_STMT
		
		
	};

}
